Skip to content

fix(asyncimageresponse): enhance check for received SVG response #9697

Merged
mgallien merged 5 commits intomasterfrom
bugfix/9685/appicon-request
Mar 26, 2026
Merged

fix(asyncimageresponse): enhance check for received SVG response #9697
mgallien merged 5 commits intomasterfrom
bugfix/9685/appicon-request

Conversation

@nilsding
Copy link
Copy Markdown
Member

@nilsding nilsding commented Mar 25, 2026

Some app icon SVGs do not start with <svg but with e.g. <?xml and could include some additional metadata (e.g. a generator comment or licence header ...) before the expected <svg tag ... therefore let's check whether the reply is an SVG by peeking at the content-type header and the first 512 bytes of the response if the header was not enough.

Resolves #9685, resolves #9689, resolves #9681.

fix confirmed on Windows 11 and on Linux (with QT_QPA_PLATFORMTHEME=gtk3 as the KDE Plasma one did not run into that)

@nilsding nilsding added this to the 33.0.1 milestone Mar 25, 2026
@nilsding nilsding self-assigned this Mar 25, 2026
@nilsding
Copy link
Copy Markdown
Member Author

/backport to stable-33.0

Copy link
Copy Markdown
Collaborator

@mgallien mgallien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

open question

Comment thread src/gui/tray/asyncimageresponse.cpp Outdated
@nilsding nilsding force-pushed the bugfix/9685/appicon-request branch 2 times, most recently from fc978c7 to 6829d5d Compare March 26, 2026 12:27
@nilsding nilsding requested a review from mgallien March 26, 2026 12:28
@mgallien mgallien enabled auto-merge March 26, 2026 14:17
Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
Some SVG files do not start with `<svg`, but with `<?xml` and could include
some additional metadata (e.g. a generator comment or licence header ...)

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
this may cause an infinite re-request loop if the layout does not match

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
@mgallien mgallien force-pushed the bugfix/9685/appicon-request branch from 6829d5d to 4b852e4 Compare March 26, 2026 14:17
@github-actions
Copy link
Copy Markdown

Artifact containing the AppImage: nextcloud-appimage-pr-9697.zip

Digest: sha256:1ebbd610b6c6452f777f2f4459bb57db58e8105a8f2dc7d6b960841221e30ad3

To test this change/fix you can download the above artifact file, unzip it, and run it.

Please make sure to quit your existing Nextcloud app and backup your data.

@mgallien mgallien merged commit 3d76dae into master Mar 26, 2026
21 checks passed
@mgallien mgallien deleted the bugfix/9685/appicon-request branch March 26, 2026 15:18
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)
4 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@nilsding nilsding linked an issue Mar 30, 2026 that may be closed by this pull request
8 tasks
@nilsding nilsding linked an issue Mar 31, 2026 that may be closed by this pull request
8 tasks
@nilsding
Copy link
Copy Markdown
Member Author

/backport to stable-4.0 please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment